<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="security"
	uri="http://www.springframework.org/security/tags"%>
<%@ page import="org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter"%>
<%@ page import="org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter"%>
<%@ page import="org.springframework.security.web.WebAttributes"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<html>
<head>
<title>用户登录</title>
<style><!--
body {
	background-color: #21a1d6;
	font-family: Arial, Helvetica, sans-serif "宋体";
	font-size: 12px;
	border: 0;
	margin: 0;
}
.png {
	behavior: url("${ctx}/images/iepngfix.htc")
}
.bg {
	background: url(${ctx}/images/login/001.png) repeat center;
	height: 596px;
}
.bg2 {
	background: url(${ctx}/images/login/002.png) no-repeat center;
	text-align: center;
	height: 596px
}
.loginbg {
	margin: 288px auto auto 75px
}
.text {
	border: #c1c6cc 0px solid;
	background: url(${ctx}/images/login/textBG.gif) repeat-x;
	width: 122px;
	height: 16px;
	padding: 1px 0 0 2px;
}
.btnLogin {
	width: 56px;
	height: 32px;
	background: url(${ctx}/images/login/003.png) no-repeat;
	border: 0;
	cursor: pointer;
	text-align: center;
	margin-left: 10px;
}
.png1 {
	behavior: url("${ctx}/images/login/iepngfix.htc")
}
.error      { background: #FBE3E4; color: #8a1f11; border-color: #FBC2C4; }
--></style>
</head>
<body cellpadding="0" cellspacing="0">
<div class="bg" align="center">
<table>
	<tr>
		<td align="center" width="1003px" height="576px">
		<div class="bg2 png">
		<ul class="loginbg">
			<form id="loginForm" action="${ctx}/j_spring_security_check" method="post" style="margin-top:1em">
				<table width="197" height="52" border="0" cellpadding="0" cellspacing="0">
					<tr>
						<td height="20"><input name="j_username" type="text" class="required"
							<s:if test="not empty param.error">
								value='<%=session.getAttribute(UsernamePasswordAuthenticationFilter.SPRING_SECURITY_LAST_USERNAME_KEY)%>'</s:if>
							/>
						</td>
						<td colspan="2">&nbsp;</td>
					</tr>
					<tr>
						<td height="32"><input name="j_password" type="password" class="required" /></td>
						<td colspan="2"><input name="submit" type="submit" value=" " class="btnLogin"  /></td>
					</tr>	
					<tr>
						<td colspan="3">
							<%
								if (session.getAttribute(WebAttributes.AUTHENTICATION_EXCEPTION) != null) {
							%> 
							<div class="error"> 登录失败，请重试.</div> 
							<%
								}
							%>
						</td>
					</tr>
				</table>
			</form>
		</ul>
		</div>
		</td>
	</tr>
</table>
</div>
</body>
</html>
